package cn.dkk.behavior_design.template_mothed.interface_impl.pojo;

/**
 * @author dkk
 * @date 2022/7/19
 * @desc 模板方法模式,模板类
 */
public class Bank {

    public void doSomething(Customer customer){
        getNum();
        line();
        business(customer);
        line();
    }

    /**
     * 排队
     */
    private void line(){
        System.out.println("排队");
    }

    /**
     * 取号
     */
    private void getNum(){
        System.out.println("取号");
    }

    /**
     * 办理业务
     */
    private void business(Customer customer){
        customer.business();
    }

    /**
     * 离开
     */
    private void live(){
        System.out.println("离开");
    }

}
